package br.com.gerenciamento.pg.site.util;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.math.NumberUtils;

public class AppUtils {
	
	private AppUtils(){}

	public static Long getParam(final HttpServletRequest request, final String nome){
		final String valor = request.getParameter( nome );
		if( valor != null ) {
			return NumberUtils.isNumber( valor ) ? NumberUtils.toLong( valor ) : null; 
		}
		return null;
	}
	
}
